package book;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Locale;

public class E10_4 {
    public static void main(String[] args) {
        int n=-1;
        byte buff[]=new byte[100];
        try{
        File f=new File("D:\\Users\\lqcone\\IdeaProjects\\Java 2 Practice\\src\\book\\Animal.java");
        FileInputStream in=new FileInputStream(f);
        while(( n=in.read(buff,0,100))!=-1){
            String s=new String(buff,0,n);
            String s2=s.toUpperCase(Locale.ROOT);
            System.out.println(s2);

        }
        }catch(IOException e){
            System.out.println("read file error");
        }
    }
}
